dnd: Fix lifecycle issues with widgets as drag icons
authorMatthias Clasen <mclasen@redhat.com>
Wed, 27 Apr 2016 00:35:25 +0000 (20:35 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 27 Apr 2016 00:35:25 +0000 (20:35 -0400)
commitc27c4e2048acb630feb24c31288f802345e99f4c
tree9d7be1d9044001dad07d6d7987679a94195950c8
parente0e114fddb8a244ae9df2fe5732828504dd79b80
dnd: Fix lifecycle issues with widgets as drag icons

The documentation clearly says that the widget is not destroyed,
but we were in fact failing to keep it alive, since it was still
a child or the icon_window when we destroy that. Fix this by
reparenting the icon_widget out before. Also, deal with the
possibility that the application might destroy the widget
halfway through, for whatever reason.
gtk/gtkdnd.c